package com.cyl.manager.pms.convert;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import com.cyl.manager.pms.domain.entity.Sku;
import com.cyl.manager.pms.domain.vo.SkuVO;
import com.cyl.manager.pms.req.SkuReq;
import com.cyl.manager.pms.resp.SkuResp;
import org.mapstruct.factory.Mappers;
import java.util.List;
/**
 * sku信息  DO <=> DTO <=> VO / BO / Query
 *
 * @author zcc
 */
@Mapper(componentModel = "spring")
public interface SkuConvert {

    SkuConvert INSTANCE = Mappers.getMapper(SkuConvert.class);

    List<SkuVO> dos2vos(List<Sku> list);

    Sku req2Entity(SkuReq req);
    
    @Mapping(target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @Mapping(target = "updateTime", dateFormat = "yyyy-MM-dd HH:mm:ss")
    SkuResp entity2Resp(Sku sku);
    
    List<SkuResp> entityList2RespList(List<Sku> list);
}
